<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>财务运营管理平台-</title>
</head>
<body>
    
<%@ include file="../common/hello-common-head.jsp"%>
		<div class="main-container-inner">
		
		<a class="menu-toggler" id="menu-toggler" href="#"> <span
				class="menu-text"></span>
			</a>
			<div class="sidebar" id="sidebar">
				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'fixed')
					} catch (e) {
					}
				</script>
				<div class="sidebar-shortcuts" id="sidebar-shortcuts">
					<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
						<button class="btn btn-success">
							<i class="icon-signal"></i>
						</button>
						<button class="btn btn-info">
							<i class="icon-pencil"></i>
						</button>
						<button class="btn btn-warning">
							<i class="icon-group"></i>
						</button>
						<button class="btn btn-danger">
							<i class="icon-cogs"></i>
						</button>
					</div>
					<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
						<span class="btn btn-success"></span> <span class="btn btn-info"></span>
						<span class="btn btn-warning"></span> <span class="btn btn-danger"></span>
					</div>
				</div>
				<!-- #sidebar-shortcuts -->
				<ul class="nav nav-list">
					<li class="open" ><a href="#" class="dropdown-toggle"> <i
							class="icon-desktop"></i> <span class="menu-text"> 工单管理 </span> <b
							class="arrow icon-angle-down"></b>
					</a>
						<ul class="submenu" style="display: block;">
							<li ><a
								href="${pageContext.request.contextPath}/workbase/searchbase">
									<i class="icon-double-angle-right"></i> 基础服务
							</a></li>
							<li class = "active"><a href="${pageContext.request.contextPath}/workbase/reportgenerate"> <i
									class="icon-double-angle-right"></i> 报表生成
							</a></li>
							<li><a href="${pageContext.request.contextPath}/workbase/dailyreportgenerate"> <i
									class="icon-double-angle-right"></i> 日报报表生成
							</a></li>
							<li><a href="#"> <i
									class="icon-double-angle-right"></i> 其他功能
							</a></li>
						</ul></li>
					<li><a href="#" class="dropdown-toggle"> <i
							class="icon-desktop"></i> <span class="menu-text"> 其他需求 </span> <b
							class="arrow icon-angle-down"></b>
					</a>
						<ul class="submenu">
							<li><a href="#" > <i
									class="icon-double-angle-right"></i> 工单管理
							</a></li>
							<li><a href="#"> <i
									class="icon-double-angle-right"></i> 其他需求
							</a></li>
						</ul></li>
				</ul>
				<!-- /.nav-list -->
				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left"
						data-icon1="icon-double-angle-left"
						data-icon2="icon-double-angle-right"></i>
				</div>
				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'collapsed')
					} catch (e) {
					}
				</script>
			</div>
		
			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try {
							ace.settings.check('breadcrumbs', 'fixed')
						} catch (e) {
						}
					</script>
					<ul class="breadcrumb">
						<li><i class="icon-home home-icon"></i> <a href="${pageContext.request.contextPath}/iuser/hello">控制台</a>
						</li>
						<li class="active">报表生成</li>
					</ul>
				</div>
<div class="page-content">
	<!-- <div class="page-header">
			<h1>
				<small>
					<i style="text-align:left">业务类型 :
							<select id="sec_trade_type">
							<option value="0">全部</option>
							<option value="1">机票</option>
							<option value="2">酒店</option>
							</select>
					</i>
				</small>
				<small>
					<i style="text-align:center">处理人:
							<select id="sec_deal_person">
								<option value="0">全部</option>
								<option value="1">李成博</option>
								<option value="2">王进洛</option>
								<option value="3">李瑞昊</option>
								<option value="4">赵佳琪</option>
							</select>
					</i>
				</small>
				<small>
					<i style="text-align:right">开始时间 :<input type="date" id="intim1" value=""/></i>
				</small>
				<small>
					<i style="text-align:right">结束时间 :<input type="date" id="intim2" value=""/></i>
				</small>
			</h1>
			<h1>&nbsp</h1>
			<h1>
				<small>
					<i style="text-align:center">
						<button onclick="secWorksheetChart()">生成</button>
					</i>
				</small>
				<small>
					<i style="text-align:right">
						<button onclick="delSecCondition()">清空</button>
					</i>
				</small>
			</h1>
	</div>  -->
	<div class="row">
		<div class="col-xs-12">
					<div class="row">
						<div class="col-sm-4" align="center">
							业务类型 :&nbsp;<select name="sec_trade_type" id="sec_trade_type"
								style="width: 200px;">
								<option value="0">全部</option>
								<option value="1">机票</option>
								<option value="2">酒店</option>
							</select>
						</div>
						<div class="col-sm-4" align="center">
							&nbsp;&nbsp;&nbsp;处理人:<select name="sec_deal_person" id="sec_deal_person"
								style="width: 200px;">
								<option value="0">全部</option>
								<option value="1">李成博</option>
								<option value="2">王进洛</option>
								<option value="3">李瑞昊</option>
								<option value="4">赵佳琪</option>
							</select>
						</div>

					</div>
					<div class="space-12"></div>
					<div class="row">
						<div class="col-sm-4" align="center">
							开始时间 :<input type="date" id="intim1" value=""
								style="width: 200px;" />
						</div>
						<div class="col-sm-4" align="center">
							结束时间 :<input type="date" id="intim2" value=""
								style="width: 200px;" />
						</div>
						<div class="col-sm-4" align="left">
							<button class="btn btn-sm btn-primary" onclick="secWorksheetChart()">生成</button>
							<button class="btn btn-sm btn-primary" onclick="delSecCondition()">清空</button>
						</div>
					</div>
					<div class="space-12"></div>

					<div class="table-header">
				工单类型明细 <a
					class="tooltip-info" data-rel="tooltip" > 
				</a>
			</div>
			
			<div class="table-responsive">
			<table id="sample-table-2"
					class="table table-striped table-bordered table-hover">
						<tr>
							<th>工单类别</th>
							<th>工单类别细分</th>
							<th colspan="2">合计</th>
						</tr>

					<tbody>
					 <tr>
					  <td rowspan="9">错误工单</td>
					  <td>描述不清楚</td>
					  <td id="desc_unclear">21</td>
					  <td id="wrong_worksheet" rowspan="9">613</td>
					 </tr>
					 <tr>
						 <td>未发起退款</td>
						 <td id="no_refund">34</td>
					 </tr>
					 <tr>
					  	 <td>百度LBS自有订单</td>
					  	 <td id="baidu_order">11</td>
					 </tr>
					 <tr>
					 	 <td>重复转单</td>
					 	 <td id="dup_trans">31</td>
					 </tr>
					 <tr>
					 	 <td>提供信息不全面</td>
					 	 <td id="info_incomplete">135</td>
					 </tr>
					 <tr>
					 	 <td>提现审核拒绝</td>
					 	 <td id="rejection_present">52</td>
					 </tr>
					 <tr>
					 	 <td>支付日志已有明确支付退款信息</td>
					 	 <td id="cleared_refund">230</td>
					 </tr>
					 <tr>
					 	 <td>非支付中心工单</td>
					 	 <td id="no_paycenter_order">86</td>
					 </tr>
					 <tr>
					 	 <td>退款、返现等金额不符</td>
					 	 <td id="amount_differ">13</td>
					 </tr>
					 <tr>
					 	 <td>其他</td>
					 	 <td>其他</td>
					 	 <td id="ws_other">35</td>
					 	 <td id="other_total">35</td>
					 </tr>
					 <tr>
					 	 <td rowspan="2">实名问题</td>
					 	 <td>绑卡失败</td>
					 	 <td id="card_failure">11</td>
					 	 <td id= "realname_prob" rowspan="2">46</td>
					 </tr>
					 <tr>
					 	 <td>修改实名认证</td>
					 	 <td id="modify_realname_auth">35</td>
					 </tr>
					 <tr>
					 	 <td>退款问题</td>
					 	 <td>网关退款</td>
					 	 <td id="gateway_refund">82</td>
					 	 <td id="refund_problem">82</td>
					 </tr>
					 <tr>
					 	 <td rowspan="3">账户咨询</td>
					 	 <td>查询提现问题</td>
					 	 <td id="query_present">16</td>
					 	 <td id="accunt_consult" rowspan="2">19</td>
					 </tr>
					  <tr>
					 	 <td>取消快捷支付</td>
					 	 <td id="quick_pay_cancel">3</td>
					 </tr>
					 <tr>
					 	 <td>大额充值问题</td>
					 	 <td id="large_recharge">3</td>
					 </tr>
					 <tr>
					 	 <td rowspan="4">支付方面</td>
					 	 <td>扣款核实订单</td>
					 	 <td id="chargeback_order">95</td>
					 	 <td id="payment_aspect" rowspan="4">143</td>
					 </tr>
					 <tr>
					 	 <td>赔付订单核实</td>
					 	 <td id="payment_order_verf">14</td>
					 </tr>
					 <tr>
					 	 <td>无法支付</td>
					 	 <td id="unable_topay">28</td>
					 </tr>
					 <tr>
					 	 <td>重复支付</td>
					 	 <td id="repeated_payment">6</td>
					 </tr>
					 <tr>
					 	 <td>咨询返现</td>
					 	 <td>返现问题</td>
					 	 <td id="return_problem">8</td>
					 	 <td id="consult_return">8</td>
					 </tr>
					 <tr>
					 	 <td colspan="2">合计</td>
					 	 <td id="total" colspan="2">946</td>
					 </tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
						<!-- /.main-content -->
</div>
</div>
<%@ include file="../common/hello-common-tail.jsp"%>

<script type="text/javascript">
$(function() {
	secWorksheetChart();
});
/**
 * 查询数据结果
 */
function secWorksheetChart() {
	//初始化系统时间
	gencurrentdate();
	var beginDate = $("#intim1").val();
	var endDate = $("#intim2").val();
	var secTradeType = $("#sec_trade_type").val();
	var secDealPerson = $("#sec_deal_person").val();

	var conditionData = {
		"beginDate" : beginDate,
		"endDate" : endDate,
		"secTradeType" : secTradeType,
		"secDealPerson" : secDealPerson
	}
	$.ajax({
				type : "GET",
				url : "${pageContext.request.contextPath}/workbase/secworksheetchart",
				async : false,
				data : conditionData,
				success : function(result) {
					setChartData(result);
				},
				error : function() {
					alert("没有数据或者数据查询失败");
				}
			});
};

/**
 * 填充表格数据
 */
function setChartData(result) {
	var data= result.data;
	$("#desc_unclear").text(data.desc_unclear);$("#no_refund").text(data.no_refund);
	$("#baidu_order").text(data.baidu_order);$("#dup_trans").text(data.dup_trans);
	$("#info_incomplete").text(data.info_incomplete);$("#rejection_present").text(data.rejection_present);
	$("#cleared_refund").text(data.cleared_refund);$("#no_paycenter_order").text(data.no_paycenter_order);
	$("#amount_differ").text(data.amount_differ);$("#ws_other").text(data.ws_other);
	$("#card_failure").text(data.card_failure);$("#modify_realname_auth").text(data.modify_realname_auth);
	$("#gateway_refund").text(data.gateway_refund);$("#query_present").text(data.query_present);
	$("#quick_pay_cancel").text(data.quick_pay_cancel);$("#large_recharge").text(data.large_recharge);
	$("#chargeback_order").text(data.chargeback_order);$("#payment_order_verf").text(data.payment_order_verf);
	$("#unable_topay").text(data.unable_topay);$("#repeated_payment").text(data.repeated_payment);
	$("#return_problem").text(data.return_problem);$("#wrong_worksheet").text(data.wrong_worksheet);
	$("#other_total").text(data.other_total);$("#realname_prob").text(data.realname_prob);
	$("#refund_problem").text(data.refund_problem);$("#accunt_consult").text(data.accunt_consult);
	$("#payment_aspect").text(data.payment_aspect);$("#consult_return").text(data.consult_return);
	$("#total").text(data.total);
}

//初始化为当前系统时间
function gencurrentdate(){
	var beginDate =$("#intim1").val();
	var endDate =$("#intim2").val();
	
	var sysDate = new Date();
	var sysYear = sysDate.getFullYear();
	var sysMonth = sysDate.getMonth()+1;
	var sysDay_f = sysDate.getDate();
	if(parseInt(sysDay_f)<10){
		var sysDay_t = 0+""+sysDay_f;
	}else{
		var sysDay_t = sysDay_f;
	}
	if(beginDate==null || beginDate==undefined || beginDate == ''){
		$("#intim1").val(sysYear+"-"+sysMonth+"-"+sysDay_t);
	}
	if(endDate==null || endDate==undefined || endDate == ''){
		$("#intim2").val(sysYear+"-"+sysMonth+"-"+sysDay_t);
	}
}
/**
 * 清空查询条件
 */
function delSecCondition(){
	var sysDate = new Date();
	var sysYear = sysDate.getFullYear();
	var sysMonth = sysDate.getMonth()+1;
	var sysDay_f = sysDate.getDate();
	if(parseInt(sysDay_f)<10){
		var sysDay_t = 0+""+sysDay_f;
	}else{
		var sysDay_t = sysDay_f;
	}
    $("#intim1").val(sysYear+"-"+sysMonth+"-"+sysDay_t);
	$("#intim2").val(sysYear+"-"+sysMonth+"-"+sysDay_t);

	$("#sec_trade_type").val("0");
	$("#sec_deal_person").val("0");
}

$( "#datepicker" ).datepicker({
	showOtherMonths: true,
	selectOtherMonths: false,
	//isRTL:true,

	
	/*
	changeMonth: true,
	changeYear: true,
	
	showButtonPanel: true,
	beforeShow: function() {
		//change button colors
		var datepicker = $(this).datepicker( "widget" );
		setTimeout(function(){
			var buttons = datepicker.find('.ui-datepicker-buttonpane')
			.find('button');
			buttons.eq(0).addClass('btn btn-xs');
			buttons.eq(1).addClass('btn btn-xs btn-success');
			buttons.wrapInner('<span class="bigger-110" />');
		}, 0);
	}
*/
});

</script>
</body>
</html>